/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package abstractmodel;


/**
 *
 * @author littlechild
 * This class produce the Factory according to the given classPath
 * 
 */
public class ModelFactoryProducer {
    /**
     * If you want to choose model.ModelFactory, you just have to pass "model.ModelFactory" as the paramter
     * @param className
     * the path of the prefered Factory
     * @return
     * the instance of the prefered Factory
     * @throws java.lang.ClassNotFoundException
     * @throws java.lang.IllegalAccessException
     * @throws java.lang.InstantiationException
     */
    static public IModelFactory getModelFactory(String className) throws ClassNotFoundException, IllegalAccessException, InstantiationException {
        return (IModelFactory)Class.forName(className).newInstance();
    }
}
